﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace weighing
{
  public  class RoleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            long uid = Int64.Parse(value.ToString());
            return RoleDao.Instance.ConverterName(uid);
            //if (v == (int)UserRoleType.Developer)
            //{
            //    return "超级管理员";
            //}
            //else if (v == (int)UserRoleType.WeighingManager)
            //{
            //    return "管理员";
            //}
            //else if (v == (int)UserRoleType.Weighinger)
            //{
            //    return "过磅员";
            //}
            //else
            //{
            //    return "未知角色";
            //}
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
